<template>
  <div class="common-layout">
    <el-container>
      <el-aside :width="isCollapse">
        <Aside />
      </el-aside>
      <el-container>
        <!-- <el-header>Header</el-header> -->
        <el-header>
          <Header />
        </el-header>
        <el-main>
        <RouterView/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup>
import Aside from '@/components/aside.vue'
import Header from '../components/navHeader.vue';
import { useStore } from 'vuex';
import { computed } from 'vue';
const store = useStore()
const isCollapse  = computed(() => 
  {return store.state.menu.isCollapse ?  '64px' : '230px'}
  )
</script>

<style lang="less" scoped>
.el-header{
  padding: 0;
}
.common-layout{
  height: 100%;
  .el-container{
    height: 100%;
  }
}
.el-main{
  background-color: #f0f4f5;
}
</style>
